﻿using Ganweisoft.IoTCenter.Module.MediaPlatform.Models;
using IoTCenter.Utilities.Models;
using System.Collections.Generic;
using System.Net.Sockets;
using System.Threading;
using System.Threading.Tasks;

namespace Onvif.WebApi.Services
{
    public interface IUdpClientService
    {
        /// <summary>
        /// 网络接口列表
        /// </summary>
        /// <returns></returns>
        Task<IEnumerable<NameValueObject>> GetNetworkInterfaceSimpleList();

        UdpClient GetUdpClient(string localIp);

        Task<int> SendProbeMessages(UdpClient udpClient, string remoteIP, string messageId);

        Task<IEnumerable<OnvifDeviceDiscoveryRecord>> ReceiveDiscoverMessages(UdpClient udpClient, string messageId, CancellationToken cancellationToken);
    }
}
